import {createApp} from "vue";
import {createPinia} from "pinia";
import {RouteRecordRaw, createRouter, createWebHashHistory} from "vue-router";
import App from "./App.vue";

console.log(App);

/**
 * 创建
 * @param component
 * @param routes
 * @param historyMode
 * @returns
 */
export function createAppContext(
  routes: RouteRecordRaw[]
) {
  let router = createRouter({
    history: createWebHashHistory(),
    routes: routes
  });
  const store = createPinia()
  let app = createApp(App);
  app.use(store)
  app.use(router)
  return app;
}
